package com.songlanyun.modules.refillorder.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.common.utils.R;
import com.songlanyun.modules.payorder.entity.PayOrder;
import com.songlanyun.modules.refillorder.entity.SaleRefillCardOrderEntity;
import com.songlanyun.modules.refillorder.model.RefillCardOrderDTO;
import com.songlanyun.modules.refillorder.model.RefillCardOrderVO;
import com.songlanyun.modules.refillorder.model.RefillOrderPayVo;
import com.songlanyun.pay.common.api.ApiResult;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 充值卡订单
 *
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-11-16 14:26:32
 */
public interface SaleRefillCardOrderService extends IService<SaleRefillCardOrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    RefillOrderPayVo buy(RefillCardOrderDTO dto);

    PayOrder paymentHandle(PayOrder payOrder);

    /**
     * 关闭订单 -充值订单
     * @param
     */
    void closeOrder(Long id);

    /**
     * 根据聚合订单号查询充值订单
     * @param code
     * @param isThrow
     * @return
     */
    SaleRefillCardOrderEntity getByPayOrderCode(String code, boolean isThrow);

    List<RefillCardOrderVO> exportList(Map<String, Object> params);

    RefillOrderPayVo directBuy(RefillCardOrderDTO refillCardOrderDTO);
}

